package com.yl.project.lvyou.questions.service.impl;

import java.util.List;
import com.yl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yl.project.lvyou.questions.mapper.UnmatchedQuestionsMapper;
import com.yl.project.lvyou.questions.domain.UnmatchedQuestions;
import com.yl.project.lvyou.questions.service.IUnmatchedQuestionsService;
import com.yl.common.utils.text.Convert;
import com.yl.framework.config.BaseService;

/**
 * 未匹配问题统计Service业务层处理
 * 
 * @author yl
 * @date 2025-03-16
 */
@Service
public class UnmatchedQuestionsServiceImpl extends BaseService<UnmatchedQuestions> implements IUnmatchedQuestionsService 
{
    @Autowired
    private UnmatchedQuestionsMapper unmatchedQuestionsMapper;

    /**
     * 查询未匹配问题统计
     * 
     * @param id 未匹配问题统计ID
     * @return 未匹配问题统计
     */
    @Override
    public UnmatchedQuestions selectUnmatchedQuestionsById(Long id)
    {
        return unmatchedQuestionsMapper.selectUnmatchedQuestionsById(id);
    }

    /**
     * 查询未匹配问题统计列表
     * 
     * @param unmatchedQuestions 未匹配问题统计
     * @return 未匹配问题统计
     */
    @Override
    public List<UnmatchedQuestions> selectUnmatchedQuestionsList(UnmatchedQuestions unmatchedQuestions)
    {
        return unmatchedQuestionsMapper.selectUnmatchedQuestionsList(unmatchedQuestions);
    }

    /**
     * 新增未匹配问题统计
     * 
     * @param unmatchedQuestions 未匹配问题统计
     * @return 结果
     */
    @Override
    public int insertUnmatchedQuestions(UnmatchedQuestions unmatchedQuestions)
    {
        unmatchedQuestions.setCreateTime(DateUtils.getNowDate());
        return unmatchedQuestionsMapper.insertUnmatchedQuestions(unmatchedQuestions);
    }

    /**
     * 修改未匹配问题统计
     * 
     * @param unmatchedQuestions 未匹配问题统计
     * @return 结果
     */
    @Override
    public int updateUnmatchedQuestions(UnmatchedQuestions unmatchedQuestions)
    {
        unmatchedQuestions.setUpdateTime(DateUtils.getNowDate());
        return unmatchedQuestionsMapper.updateUnmatchedQuestions(unmatchedQuestions);
    }

    /**
     * 删除未匹配问题统计对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteUnmatchedQuestionsByIds(String ids)
    {
        return unmatchedQuestionsMapper.deleteUnmatchedQuestionsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除未匹配问题统计信息
     * 
     * @param id 未匹配问题统计ID
     * @return 结果
     */
    @Override
    public int deleteUnmatchedQuestionsById(Long id)
    {
        return unmatchedQuestionsMapper.deleteUnmatchedQuestionsById(id);
    }

    @Override
    public UnmatchedQuestions selectUnmatchedQuestionsByQuestions(UnmatchedQuestions unmatchedQuestions) {
        return unmatchedQuestionsMapper.selectUnmatchedQuestionsByQuestions(unmatchedQuestions);
    }
}
